package com.hz.basic.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hz.basic.dao.CbExpandEditionDao;
import com.hz.basic.entity.CbBookEditionEntity;
import com.hz.basic.entity.CbExpandEditionEntity;
import com.hz.basic.entity.CbStiffSystemEntity;
import com.hz.basic.service.CbExpandEditionService;
import com.hz.common.utils.PageUtils;
import com.hz.common.utils.Query;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("cbExpandEditionService")
public class CbExpandEditionServiceImpl extends ServiceImpl<CbExpandEditionDao, CbExpandEditionEntity> implements CbExpandEditionService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<CbExpandEditionEntity> page = this.page(
                new Query<CbExpandEditionEntity>().getPage(params),
                new QueryWrapper<CbExpandEditionEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<CbBookEditionEntity> getbookexpandedition(long userId) {
        return this.baseMapper.getbookexpandedition(userId);
    }

    @Override
    public List<CbStiffSystemEntity> getstiffbookexpandedition(long userId) {
        return this.baseMapper.getstiffbookexpandedition(userId);
    }

}